# -*- mode: org; fill-column: 80; -*-
#+TITLE: How to install texlive
#+AUTHOR: Zelphir Kaltstahl
#+STARTUP: content indent align inlineimages hideblocks entitiesplain nologdone nologreschedule nologredeadline nologrefile
#+KEYWRODS: texlive howto install guix
#+TODO: TODO UNDOCUMENTED | DONE
#+DATE: [2023-01-14 Sa]
#+LANGUAGE: en
#+PRIORITIES: A E E
#+OPTIONS: ^:{}
#+OPTIONS: H:10
#+OPTIONS: toc:2
#+OPTIONS: tags:nil
#+OPTIONS: tasks:nil
#+OPTIONS: H:6
#+OPTIONS: p:nil
#+OPTIONS: pri:nil
#+OPTIONS: prop:nil
#+OPTIONS: todo:nil
#+OPTIONS: stat:nil
#+OPTIONS: |:t
#+OPTIONS: inline:nil

* How to install texlive

1. download installer from: [[https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz]]
2. extract the archive
3. switch to directory of extracted archive
4. run installer as root:
   #+begin_src sh
sudo perl ./install-tl
   #+end_src
5. it will show something like this:
   #+begin_quote
======================> TeX Live installation procedure <=====================

======>   Letters/digits in <angle brackets> indicate   <=======
======>   menu items for actions or customizations      <=======
= help>   https://tug.org/texlive/doc/install-tl.html   <=======

 Detected platform: GNU/Linux on x86_64

 <B> set binary platforms: 1 out of 16

 <S> set installation scheme: scheme-full

 <C> set installation collections:
     40 collections out of 41, disk space required: 7605 MB (free: 47337 MB)

 <D> set directories:
   TEXDIR (the main TeX directory):
     /usr/local/texlive/2022
   TEXMFLOCAL (directory for site-wide local files):
     /usr/local/texlive/texmf-local
   TEXMFSYSVAR (directory for variable and automatically generated data):
     /usr/local/texlive/2022/texmf-var
   TEXMFSYSCONFIG (directory for local config):
     /usr/local/texlive/2022/texmf-config
   TEXMFVAR (personal directory for variable and automatically generated data):
     ~/.texlive2022/texmf-var
   TEXMFCONFIG (personal directory for local config):
     ~/.texlive2022/texmf-config
   TEXMFHOME (directory for user-specific files):
     ~/texmf

 <O> options:
   [ ] use letter size instead of A4 by default
   [X] allow execution of restricted list of programs via \write18
   [X] create all format files
   [X] install macro/font doc tree
   [X] install macro/font source tree
   [ ] create symlinks to standard directories

 <V> set up for portable installation

Actions:
 <I> start installation to hard disk
 <P> save installation profile to 'texlive.profile' and exit
 <Q> quit

Enter command:
   #+end_quote
6. enter =V= for portable installation
7. enter =I= to start installation. this will take a long while downloading all packages.
8. after the installation has finished add something like the following to your =~/.profile=:
   #+begin_src sh
###########
# TEXLIVE #
###########
export MANPATH="${MANPATH}:/usr/local/texlive/2022/texmf-dist/doc/man"
export INFOPATH="${INFOPATH}:/usr/local/texlive/2022/texmf-dist/doc/info"
export PATH="${PATH}:/usr/local/texlive/2022/bin/x86_64-linux"

# the main TeX directory
export TEXDIR="/usr/local/texlive/2022"
# directory for site-wide local files
export TEXMFLOCAL="/usr/local/texlive/texmf-local"
# directory for variable and automatically generated data
export TEXMFSYSVAR="/usr/local/texlive/2022/texmf-var"
# directory for local config
export TEXMFSYSCONFIG="/usr/local/texlive/2022/texmf-config"
# personal directory for variable and automatically generated data
export TEXMFVAR="${HOME}/.texlive2022/texmf-var"
# personal directory for local config
export TEXMFCONFIG="${HOME}/.texlive2022/texmf-config"
# directory for user-specific files
export TEXMFHOME="${HOME}/texmf"
   #+end_src
